<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>

</body>
<script>
    // 需求：将数组中重复的数据去掉
    var arr = [1, 3, 5, 6, 3, 5, 1]
    // 可以使用 set 对象进行去重
    var newArr = [...new Set(arr)]
    console.log(newArr)
</script>

</html>